// player.hpp

#include <iostream>

#include "timer.hpp"

#ifndef PLAYER_HPP_
#define PLAYER_HPP_

class Player {
public:
   // Constructor
   Player();

   // Destructor
   ~Player();

   void init();
   void update(SDL_Surface *screen);
   void handle_input(SDL_Event event);

   int get_x(void); int get_y(void);
   int get_bullets(void); int get_lives(void);
   bool is_shooting(void);

private:
   int xvel, yvel;     // Player's velocity.
   float heading;      // Where the player is facing (0 = north, 1 = east, 2 =
   int lives;          // The number of lives available.
   int bullets;        // The number of bullets the player has.
                       // south, 3 = west).
   bool shooting;      // If the player is shooting or not.
   bool moving;        // If the player is moving or not.

   SDL_Rect box;       // The box containing player's offset and size.
   SDL_Surface *skin;  // Player's skin (sprites).

   Timer shoot_delay;  // I don't want the player to shoot 100 times in 1 sec!

   void check_shoot();
};

#endif
